import Vue from 'vue'
import Router from 'vue-router'
import Hello from '../components/Hello'
import Home from '../pages/home/home.vue'
//import Desk from '../pages/contents/desk/desk.vue';
const Desk = resolve => require(['../pages/contents/desk/desk.vue'], resolve)
const Order = resolve => require(['../pages/contents/order/order.vue'], resolve)
Vue.use(Router)

const routers = [{
    path: '/',
    name: 'Home',
    component: Home,
    children: [{
            path: '',
            component: Desk
        }, {
            path: '/order',
            component: Order
        },
        { path: '*', redirect: '/' }
    ]
}]

export default new Router({
    mode: 'history',
    routes: routers,
})